# Contributor: Zach DeCook <zachdecook@librem.one>
maintainer="Zach DeCook <zachdecook@librem.one>"
pkgname=hyprutils
pkgver=0.2.3
pkgrel=0
pkgdesc="Hyprland utilities library used across the ecosystem"
url="https://github.com/hyprwm/hyprutils"
arch="all"
license="BSD-3-Clause"
source="https://github.com/hyprwm/hyprutils/archive/v$pkgver/hyprutils-v$pkgver.tar.gz"
makedepends="cmake pixman-dev"
subpackages="$pkgname-doc $pkgname-dev"

build() {
	cmake -B build \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib \
		-DCMAKE_BUILD_TYPE=None
	cmake --build build
}

check() {
	cd build
	CTEST_OUTPUT_ON_FAILURE=TRUE ctest
}

package() {
	DESTDIR="$pkgdir" cmake --install build
	install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
}


sha512sums="
00b65d3d253e9b4da307c5fefe7d50cef4a84ba0d7d073f6222ff2eaf7e23cdb8685988d66169d6f93caf5d91dceacc5e718644375401a7686359d89cfd3e5f7  hyprutils-v0.2.3.tar.gz
"
